package service.impl;

import dao.RoleDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import po.Role;
import service.RoleService;

import java.util.List;

@Service
@Transactional
public class RoleServiceImpl implements RoleService {
    // 注解注入 RoleDao
    @Autowired
    private RoleDao roleDao;
    @Override
    public Role roleOfId(Integer id) {
        return this.roleDao.roleOfId(id);
    }

    @Override
    public List<Role> allRole() {
        return this.roleDao.allRole();
    }
}
